﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewRen.Models
{
    /// <summary>
    /// 镇
    /// </summary>
    public class Town
    {
        public int ID { set; get; }

        [StringLength(50)]
        [Index]
        public string TownName { set; get; }

        /// <summary>
        /// 区县ID
        /// </summary>
        [ForeignKey("District")]
        public int DistrictID { set; get; }

        public virtual District District { set; get; }

    }
}
